package com.hiyee.response;

/**
 * 接口返回信息枚举类
 *
 * @author WangBin
 */
public enum ResponseStatusEnum {

    SUCCESS(200, "业务处理成功"),
    FAIL(500, "业务处理失败"),

    AUTH_FAIL(401, "登录信息已失效，请重新登录"),
    AUTH_FORBIDDEN(403, "请登录"),
    LOGIN_TYPE_NOT_FOUND(500, "未知的登录方式"),

    REQUEST_PARAM_ERROR(500, "错误的请求参数"),
    UPLOAD_FILE_SIZE_LIMIT(500, "文件大写已超过500kb"),

    CUSTOMER_LOGIN_FAIL(500, "用户名或者密码不正确"),
    SMS_CODE_SCENE_NOT_FOUND(500, "未知的验证码场景"),

    SMS_CODE_SEND_BUSINESS(500, "操作频繁，请稍后再试"),
    SMS_CODE_ERROR(500, "验证码不正确"),

    CUSTOMER_NOT_FOUND(500, "客户信息不存在"),
    CUSTOMER_MOBILE_EXIST(500, "手机号已存在"),

    GOODS_NOT_FOUND(500, "商品信息不存在"),
    GOODS_UNDER_STOCK(500, "商品库存不足"),

    CART_ADD_FAIL(500, "添加购物车出错"),
    CART_UPDATE_FAIL(500, "更新购物车出错"),
    CART_DELETE_FAIL(500, "删除购物车商品出错"),

    ;

    private Integer status;
    private String msg;

    ResponseStatusEnum(Integer status, String msg) {
        this.status = status;
        this.msg = msg;
    }

    public Integer getStatus() {
        return status;
    }

    public String getMsg() {
        return msg;
    }
}
